package server.login;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;

public class LoginServer extends Thread implements Runnable {
	ServerSocket server;
	Socket client;
	BufferedReader  in;
	PrintWriter  out;
	
	public LoginServer() throws IOException {
		server = new ServerSocket(29000);
		client = server.accept();
	}
	
	public void escutar() throws IOException {
		out = new PrintWriter(
                client.getOutputStream(), true);
		in = new BufferedReader(
                new InputStreamReader(
                    client.getInputStream()));
		System.out.println(in.readLine());
	}
	
	public static void main(String[] args) throws IOException {
		LoginServer l = new LoginServer();
		l.escutar();
		System.out.println("Terminou");
	}
}
